home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94a.txt / 000031_icon-group-sender _Mon Jan 31 13:01:24 1994.msg < prev    next >
Internet Message Format  |  1994-08-19  |  8KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 31 Jan 1994 12:20:10 MST
  2. From: CHUCK.GIBBONS@sprint.sprint.com
  3. Date: 31 Jan 94 13:01:24-0500
  4. P1-Message-Id: US*TELEMAIL;FGJE-5900-8176/27
  5. To: icon-group@cs.arizona.edu
  6. Subject: RE: document formatting 
  7. Message-Id: 
  8.         <"FGJE-5900-8176/27"*/PN=CHUCK.GIBBONS/O=US.SPRINT/ADMD=TELEMAIL/C=US/@sprint.com>
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12.  
  13. >   I am interested in a simple text formatting program, something which is a
  14. > primitive form of nroff.  The input is a plain text file with special
  15. > formatting instructions which govern the format of the lines following the
  16. > command.  The most primitive set of commands might be something like
  17.  
  18. I've used ``cawf'' with good results on a PC under MSDOS.  Use archie to
  19. find the UNIX version.
  20.  
  21. The PC version is available at the Simtel archives
  22.  
  23. PD1:<MSDOS.TXTUTL>CAWF2.ZIP    Formats docs intended for nroff -man, w/C src
  24.  
  25. The ``readme'' file follows.
  26.  
  27. ------------ start 00README ------------------------
  28. Cawf - nroff-like text formatter
  29.  
  30. Cawf is a C version of awf, Henry Spencer's Amazingly Workable (text)
  31. Formatter.  (Awf is written in awk and appears in comp.sources.unix,
  32. Volume 23, Issue 27.)  Cawf and awf provide a usable subset of raw nroff
  33. capabilities and the styles of the man(7) and ms(7) macro sets.  One of
  34. cawf's virtues is that it will run on PC clones under MS-DOS.  It is
  35. also, like awf, totally independent of any licensed Unix source code.
  36.  
  37. This is the second distribution of cawf.  Changes include:
  38.  
  39.     o  Support has been added for a few more nroff commands -- .di, .tr,
  40.        and \k.
  41.  
  42.     o  Known bugs have been corrected, including bugs in the man.mac
  43.        and ms.mac files:
  44.  
  45.         Error in skipping to predicate of argument string comparison
  46.         .if;
  47.  
  48.         Improved .ti handling, including the undocumented, oft-used
  49.         absolute form;
  50.  
  51.         Error in output of .NH numbers;
  52.  
  53.         Handle expressions that aren't separated from the command by
  54.         white space -- e. g., ".ti0";
  55.  
  56.         Compensate for printers that can't print a blank line,
  57.         followed by a FF without printing a blank page.
  58.  
  59.     o  A limited printer formatting capability has been added via a small
  60.        change to cawf (the -fe option) and the addition of a post-filter,
  61.        fontfilt(1).
  62.  
  63.     o  Documentation has been added to describe the additions.
  64.  
  65.  
  66. CONTENTS
  67. --------
  68.  
  69. This distribution of cawf includes:
  70.  
  71.     *.c and *.h    source files to build cawf, bsfilt (bsfilt
  72.             removes Backspaces from cawf output) and
  73.             fontfilt (fontfilt provides more elaborate
  74.             font and type style filtering)
  75.     bsfilt.1    nroff source for the bsfilt manual page
  76.     bsfilt.exe    bsfilt executable for MS-DOS
  77.     bsfilt.man    the formatted (with cawf -fn) bsfilt manual page
  78.     cawf.1        nroff source for the cawf manual page
  79.     cawf.exe    cawf executable for MS-DOS
  80.     cawf.mak    MS-DOS, Quick-C make file for cawf
  81.     cawf.man    the formatted (with cawf -fn) cawf manual page
  82.     common        initialization file for CAWFLIB library
  83.     dumb.dev    device description file for CAWFLIB library
  84.     fontfilt.1    nroff source for the fontfilt manual page
  85.     fontfilt.cf    device and font configuration file for fontfilt(1)
  86.     fontfilt.exe    fontfilt executable for MS-DOS
  87.     fontfilt.mak    MS-DOS Quick-C make file for fontfilt
  88.     fontfilt.man    the formatted (with cawf -fn) fontfilt manual page
  89.     makefile    Unix-style make file
  90.     man.mac        man(7) macros for CAWFLIB library
  91.     ms.mac        ms(7) macros for CAWFLIB library
  92.  
  93.  
  94. LIBRARY
  95. -------
  96.  
  97. To use cawf, you must select a location for the CAWFLIB library files.  The
  98. distributed cawf.exe expects to find them in c:\sys\lib\cawf, but you can
  99. alter that with the CAWFLIB environment variable, or you can change the
  100. CAWFLIB #define in cawf.h and rebuild cawf from the sources.
  101.  
  102. CAWFLIB contains a minimum of five files:
  103.  
  104.     common        common raw nroff commands to get cawf started
  105.     dumb.dev    a basic set of definitions for a plain, "dumb"
  106.             output device - e. g., the console display or
  107.             a generic line printer
  108.     fontfilt.cf    the device and font configuration file for
  109.             fontfilt(1)
  110.     man.mac        the man(7) macros
  111.     ms.mac        the ms(7) macros
  112.  
  113. You may want to add your own macro files to the library.  Just name them
  114. "m[your-name].mac", following the usual nroff naming convention for macro
  115. files.
  116.  
  117. If you have fancy output devices, you may want to generate new *.dev files
  118. for them.  Follow the format of dumb.dev.  To define support for a new
  119. device, select a name prefix for it and create a file in CAWFLIB with the
  120. name "<prefix>.dev".  To use the new device file, set the TERM environment
  121. variable to <prefix> - e. g., when I test cawf on Unix, I need a vt100.dev,
  122. because my TERM environment variable value is usually vt100.  (All I need
  123. do is make vt100.dev a symbolic link to dumb.dev.)
  124.  
  125. Through its -fe option and the fontfilt(1) post-filter cawf provides
  126. limited support for printer devices.  Cawf and fontfilt can be directed
  127. to issue specific printer codes for bold and italic characters, and one
  128. font can be selected for the entire document.  A device and font
  129. configuration file is used for these selections, and the file can be
  130. easily changed for individual printers.
  131.  
  132.  
  133. SOURCES
  134. -------
  135.  
  136. A generic Unix make file and a cawf.mak file for version 2.5 of Microsoft
  137. MS-DOS Quick-C are included.  The Unix make file has some definitions that
  138. help tune it to the local Unix environment:
  139.  
  140.     CAWFLIB        is a string that can be used in lieu of changes
  141.             to cawf.h's CWFLIB #define.
  142.  
  143.     UNIX        switches the build environment to Unix.
  144.  
  145.     USG        adjusts for System V.  (UNIX must also be defined.)
  146.  
  147.     STDLIB        indicates that standard library function prototype
  148.             definitions may be found in <stddef.h>.
  149.  
  150.             If STDLIB is not defined, the cawf sources try to
  151.             define their own library function return values.
  152.  
  153. Cawf has been successfully built and tested in the UNIX context under 4.3BSD
  154. Tahoe, Ultrix 2.2, SunOS 4.0, Dynix 3.0.12, ETAV (a SYSV 3.2 derivative) and
  155. NeXTStep 1.0a/2.0.  If you try to build under a BSD derivative Unix that
  156. doesn't have the SYSV string functions, strchr() and strrchr(), simply
  157. redefine them to the index() and rindex() functions.
  158.  
  159.  
  160. MS-DOS CONSIDERATIONS
  161. ---------------------
  162.  
  163. The MS-DOS version of cawf was created to run under the KornShell of the
  164. Mortis Kern Systems Toolkit.  One ramification of using MKS' ksh is that it
  165. supports the separate standard error and standard output streams.  Hence,
  166. cawf blithely distributes its error messages to the standard error file, and
  167. assumes the user's shell is capable of separating them from standard output.
  168.  
  169. If you don't use the MKS KornShell, but do want to separate the output
  170. streams, you'll have to modify the cawf source code.  As a rudimentary aid,
  171. cawf uses a separate stream pointer, Efs, for writing error output, but sets
  172. it to stderr.  You can change that process to open a separate error file and
  173. set Efs to point to it.
  174.  
  175.  
  176. COPYRIGHTS AND CREDITS
  177. ----------------------
  178.  
  179. The sources are copyrighted, but freely distributable under usual terms -
  180. retention of credit, etc.
  181.  
  182. Please acknowledge:
  183.  
  184.     AT&T for their public-domain release of getopt(3) at the 1985
  185.     UNIFORUM conference
  186.  
  187.     Chet Creider and Ted Campbell for their contributions to font
  188.     filtering
  189.  
  190.     Henry Spencer for awf and his regular expression package
  191.  
  192. Henry says about awf, "I can't believe I really wrote this."  Those are
  193. my sentiments exactly about cawf, but I also understand that necessity
  194. sometimes forces us to do what we would prefer to avoid.
  195.  
  196.  
  197. BUGS AND ENHANCEMENTS
  198. ---------------------
  199.  
  200. I'll be glad to hear about bugs and needs for enhancements, but make no
  201. promises about delivering fixes or upgrades in response.
  202.  
  203. Vic Abell <abe@mace.cc.purdue.edu>
  204. 4 June 1991
  205. -------------- end 00README ------------------------
  206. Charles J. Gibbons          chuck.gibbons@sprint.sprint.com
  207. home: 913/649-8175          work: 816/854-3802
  208.  ----
  209.  Don't take life so serious, son --- it ain't no how permanent.
  210.  
  211.